<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>地图demo</title>
    <link type="text/css" rel="stylesheet" href="css/MapGis.css" />
    <script type="text/javascript" src="jquery.min.js" ></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=tXStBlc74VxClyLQcRo98OPiKcMTzvj2">
    //v2.0版本的引用方式：src="http://api.map.baidu.com/api?v=2.0&ak=wMZsrqiG6v2Fkw5r4i1ezw7o4TiPa519"
    </script>
    <script src="js/MapPosition.js"></script>
    <style type="text/css">
        *{
            padding: 0;
            margin:0;
        }
        html,body{
            height: 100%;
            width:100%;
        }
    </style>
</head>
<body>
    <div id="container" style="width:600px;height: 600px;background: greenyellow"></div>
    <script type="text/javascript">
        $(function(){
           mapPosition("container",{position:{
               lng:117.287873,
               lat:31.858601
           }},function(data){
               //保存后返回函数

               alert(data.lng);
           });
        })    
    </script>
</body>
</html>